import request from '@/utils/request'
import type { unbindPersonalType } from './types'

class APIInformation {
    /** 修改用户基本信息 */
    static changePersonal(data: any) {
        return request<any, any>({
            url: '/changePersonal',
            method: 'POST',
            data
        })
    }


    /** 解绑基本信息 */
    static unbindPersonal(type: unbindPersonalType) {
        return request<any, any>({
            url: '/unbindPersonal',
            method: 'POST',
            data: { type }
        })
    }


    /** 获取绑定公众号二维码 */
    static getBindQRCode() {
        return request<any, any>({
            url: '/WeChat/bindQRCode',
            method: 'POST'
        })
    }

    /** 绑定公众号检测结果 */
    static checkBindState(scene_str: string) {
        return request<any, any>({
            url: '/WeChat/checkBindState',
            method: 'POST',
            data: {
                scene_str
            }
        })
    }

}

export default APIInformation
